<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
</head>

<body>
	<div id="header-wrap" data-mn="0">
		<a href="###" data-link="safe" data-type="ico" class="left ico-m ico-left"></a>
		<h2>设置交易密码</h2>
	</div>
	<div class="" id="">
		<div class="tips">
			<div class="t-error">密码需要6位以上数字和字母的组合！</div>
		</div>
		<form>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-lock-2" data-type="ico">
				<div class="fl-cont form-input f-right-ico">
					<input type="password" id="pw_input" placeholder="请设置交易密码" />
					<a href="###" data-type="ico" class="check-pw ico-m ico-eye"></a>
				</div>
			</li>
		</ul>
		<div class="">
			<a href="###" data-link="edit-tpw-3" class="btn b-red"><span id="check">确认</span></a>
		</div>
		</form>
		
	</div>
	<script>
	$(function(){
		$(".check-pw").hover(
			function(){$(this).siblings("input").attr("type","text")},
			function(){$(this).siblings("input").attr("type","password")}
		)
		$("#check").on("click",function(){
			var tpw = $("#pw_input").val();
			var check_return = $("#pw_input").check({type:6})
			if(check_return == 0){
				$(".t-error").text("交易密码为6位纯数字").fadeIn()
				$(".t-info").hide()
				reset_tip()
				return false
			}else{
				$.cookie("tpw",tpw)
				$.cookie("id_temp","",{expires: -1})
			}
		})
	})
	</script>	
</body>

</html>
